<script lang="ts">
import { defineComponent, watch } from 'vue'
export default defineComponent({
    name: 'jxtechAttachmentDialog'
})
</script>
<script lang='ts' setup>
import { reactive, ref } from 'vue'

const emit = defineEmits<{
    (e: 'update:dialogVisible', val: Boolean): void
}>()
const props = defineProps({
    dialogVisible: {
        type: Boolean,
        require: true
    },
    width: {
        type: String,
        default: "1400px"
    },
    Tips: {
        type: String,
        default: "附件管理"
    },
    itemType: {
        type: String,
        required: true
    },
    busiId: {
        type: [String, Number],
        required: true
    },
    compId: {
        type: [String, Number],
        required: true
    },
    projectid: {
        type: [String, Number],
        required: true,
    }
})
const documentDialogVisible = ref(props.dialogVisible)
watch(() => props.dialogVisible, (val) => {
    documentDialogVisible.value = val
})
watch(documentDialogVisible, (val) => {
    documentDialogVisible.value = val
    emit('update:dialogVisible', val)
})
const documentDialogState = reactive({
    dialogVisible: props.dialogVisible,
    handleClose: () => {
        documentDialogVisible.value = false
    }
})
</script>
<template>
    <el-dialog
        v-model="documentDialogVisible"
        :title="props.Tips"
        :width="props.width"
        :before-close="documentDialogState.handleClose"
    >
        <jxtech-attachment
            :height="460"
            :itemType="props.itemType"
            :busiId="props.busiId"
            :compId="props.compId"
            :projectid="props.projectid"
        ></jxtech-attachment>
    </el-dialog>
</template>

<style lang="scss" scoped>
</style>

